package ai.yue.open.service.cd.ipo;

import ai.yue.library.base.ipo.ValidationGroups;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import org.springframework.lang.Nullable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 镜像版本
 *
 * @author yl-yue
 * @since  2023/2/7
 */
@Data
public class DockerImageIPO {

    private static final long serialVersionUID = 1L;

    @NotNull(groups = {ValidationGroups.Update.class})
    private Long id;

    /**
     * 镜像名
     */
    @NotBlank
    private String imageName;

    /**
     * 镜像地址
     */
    @NotBlank
    private String imageAddr;

    /**
     * 镜像版本
     */
    @Nullable
    @JSONField(deserializeUsing = JSONArray.class)
    private List<String> imageTags;

}
